<?php

namespace app\admin\model\episode;

use think\Model;


class Info extends Model
{

    

    

    // 表名
    protected $name = 'episode_info';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];
    

    







    public function script()
    {
        return $this->belongsTo('Script', 'episode_script_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }


    public function chapter()
    {
        return $this->belongsTo('Chapter', 'episode_chapter_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }


    public function character()
    {
        return $this->belongsTo('Character', 'episode_character_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }


    public function level()
    {
        return $this->belongsTo('app\admin\model\system\Level', 'system_level_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }


    public function prop()
    {
        return $this->belongsTo('app\admin\model\system\Prop', 'system_prop_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function getTypeList()
    {
        return ['1' => __('Type 1'), '2' => __('Type 2'), '3' => __('Type 3'), '4' => __('Type 4'), '5' => __('Type 5'), '6' => __('Type 6'), '7' => __('Type 7')];
    }

    
    public function getVersionTypeList()
    {
        return ['1' => __('Version_type 1'), '2' => __('Version_type 2')];
    }

    public function getIsBannerList()
    {
        return ['1' => __('Is_banner 1'), '2' => __('Is_banner 2')];
    }
}
